﻿@using KL.Store.Core
@{
    ViewBag.Title = "Siparişim";
    Layout = "~/Views/Shared/" + Parameters.Layout + ".cshtml";

    var menuStyle = "col-xs-12 col-sm-12 col-md-3 col-lg-2 left first last";
    var contentStyle = "col-xs-12 col-sm-12 col-md-9 col-lg-10 right";
    if (Parameters.Theme == "HA")
    {
        menuStyle = "";
        contentStyle = "col-xs-12 col-sm-12 col-md-12 col-lg-12 right";
    }
    else if (Parameters.Theme == "DK" || Parameters.Theme == "EO")
    {
        menuStyle = "col-xs-12 col-sm-12 col-md-3 col-lg-3 left first last";
        contentStyle = "col-xs-12 col-sm-12 col-md-9 col-lg-9 right";
    } 
}
@if (Parameters.Theme != "HA")
{
    <div class="@menuStyle">
        @{ Html.RenderAction("Account", "Partials"); }
    </div>
}
<div class="@contentStyle">

    <div class="pay-processes hidden-xs hidden-sm">
        <span class="process1">
            <img src="/Images/@Parameters.Theme/process1-deactive.jpg" />
            Sepetim
        </span>
        <span class="process2">
            <img src="/Images/@Parameters.Theme/process2-deactive.jpg" />
            Teslimat ve Ödeme
        </span>
        <span class="process3 active">
            <img src="/Images/@Parameters.Theme/process3-active.jpg" />
            Sipariş Onayı
        </span>
    </div>
    <hr />
    @if (Parameters.Theme == "HAAA")
    {
        <div class="breadcrumb col-xs-12 col-sm-12 col-md-12 col-lg-12">
            <div class="bcBorder"></div>
            <div class="bcLinks">
                <div itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
                    <a href="/" itemprop="url">
                        <span itemprop="title">Anasayfa</span>
                    </a>›
                </div>
                <div itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
                    <a href="/Cart/Index" itemprop="url">
                        <span itemprop="title">Sepetim</span>
                    </a>
                </div>
            </div>
            <div class="bcBorder"></div>
        </div>
    }
    <div class="clearfix"></div>
    <div class="contentCart">
        @{Html.RenderAction("PaymentSucceeded", "Cart", new { id = ViewContext.RouteData.Values["id"] });}
    </div>
    <div class="clearfix"></div>
    @{Html.RenderAction("OurSuggestions", "Partials");}
</div>
<script>
    $('a.addToCart').click(function () {
        var qsId = $(this).attr('id').split("_")[1];
        $('#cart').load('/Cart/Insert', { id: qsId });
        $('#sepetMinimalContent').load('/Cart/GetMinimal', { showPhotos: true });
        $('body,html').animate({
            scrollTop: 0
        }, 800);
        $(".sepetFull img").delay(1000).fadeOut("slow").fadeIn("slow");
        return false;
    });
</script>
